<template>
	<view class="container" :style="{height:`calc(100vh - ${height}px)`}">
		<Header back :title="title"></Header>
		<view class="wapper">
			<waterfall :dataList="list" :showDel="false" showDetail @toDetail="toDetail"></waterfall>
		</view>
	</view>
</template>

<script>
	import Header from '@/components/haeder.vue'
	import waterfall from '@/components/waterfall.vue'
	import banner1 from '@/static/banner/banner1.png'
	export default {
		components: {
			Header,
			waterfall
		},
		data() {
			return {
				height: 0,
				content: '',
				title: '展台照片',
				head: '',
				bannerList: [],
				list: []
			}
		},
		methods: {
			async search() {
				let res = await this.$api.getPicss({
					pagesize: 9999,
					pageindex: 1
				})
				this.list = res.UserData
			},
			toDetail(v) {
				uni.navigateTo({
					url: '../navs/company?data=' + encodeURIComponent(JSON.stringify({ZhangShangID:v.QiYeID}))
				})
			}
		},
		onLoad(e) {

		},
		async mounted() {
			this.search()
		},
		created() {
			let app = uni.getSystemInfoSync();
			this.height = app.windowBottom
		}
	}
</script>

<style scoped lang="scss">
	.container {
		width: 100vw;
		overflow: auto;
		display: flex;
		flex-direction: column;

		.wapper {
			flex: 1;
			background: #f2f2f2;
			z-index: 100;
			margin-top: -280rpx;

			.title {
				margin-top: 20rpx;
				text-align: center;

				span {
					padding: 10rpx;
					color: #0c6cc1;
					font-size: 28rpx;
					border: 1px solid #000;
					box-shadow: 14rpx 14rpx 0rpx #0c6cc1;
				}
			}

			.banner {
				margin: 40rpx 0;
				border-radius: 40rpx;
				overflow: hidden;
			}

			.content {
				margin-top: 40rpx;
				padding: 10rpx;
				text-indent: 2em;
				color: #0c6cc1;
				border: 1px solid #000;
				box-shadow: 14rpx 14rpx 0rpx #0c6cc1;
				font-size: 24rpx;
			}
		}
	}
</style>